import request from '@/service'

// 添加轮播图
export function addCarousel(insertInfo: any) {
  return request.post({
    url: '/setting/carousel',
    data: insertInfo
  })
}

// 删除轮播图
export function removeCarousel(carousel_id: number) {
  return request.delete({
    url: `/setting/carousel/${carousel_id}`
  })
}

// 修改轮播图状态
export function updateCarouselStatus(carousel_id: number, status: string) {
  return request.put({
    url: `/setting/carousel/${carousel_id}/status`,
    params: {
      status
    }
  })
}

// 查询轮播图
export function getCarousels(queryInfo: any) {
  return request.get({
    url: `/setting/carousel`,
    params: {
      ...queryInfo
    }
  })
}
